<template>
  <div>
    <van-swipe
      class="my-swipe"
      :autoplay="3000"
      indicator-color="white"
    >
      <van-swipe-item
        v-for="item in aaa"
        :key="item.id"
      >
        <img
          :src="item.img"
          alt=""
        >
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
import axios from 'axios'
axios.defaults.baseURL="http://127.0.0.1:8888"
export default {
  data: () => ({
    aaa: '',
    
  }),
  created() {
    this.getlunbo()
  },
  methods: {
     getlunbo() {
      axios.get('/api/getlunbo').then((res) => {
        console.log(res.data.message)
        this.aaa = res.data.message
      })
    },
  },
}
</script>
<style  scoped>
.my-swipe .van-swipe-item {
  height: 200px;
}
.my-swipe img {
  height: 100%;
  width: 100%;
}
</style>